import React from 'react';
import {Home, PhoneLogin, ScannerScreen, Payment, Captcha} from 'WE/UI/Page';
import HomeHeaderRight from 'WE/UI/Components/HomeHeaderRight';
import DeviceList from 'WE/UI/Page/DeviceList';
import R from 'WE/Utils/request';
// @ts-ignore
global.smsRequest = R.smsRequest;
// @ts-ignore
global.lpRequest = R.lpRequest;

export default function Remotes(): Array<object> {
  return [
    {
      name: 'Home',
      component: Home,
      options: ({navigation}: {navigation: any}) => ({
        title: '验证码',
        headerRight: () => <HomeHeaderRight navigation={navigation} />,
      }),
    },
    {
      name: 'ScannerScreen',
      options: {headerShown: false},
      component: ScannerScreen,
    },
    {
      name: 'PhoneLogin',
      options: {headerShown: false},
      component: PhoneLogin,
    },
    {
      name: 'DeviceList',
      options: {title: '设备列表'},
      component: DeviceList,
    },
    {
      name: 'Payment',
      options: {title: '支付跳转事例'},
      component: Payment,
    },
    {
      name: 'Captcha',
      options: {title: '验证码'},
      component: Captcha,
    },
  ];
}
